home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 2003-06-24 | 68.1 KB | 2,096 lines
var CCOneBoxHeight = "190px"; // 298 var EGCCOneBoxHeight = "275px"; var ALMode = ""; // Mode of Operation, New, Edit, Delete, Lookup, ObjectLookup var ALupMode = ""; // Lookup Mode of Operation, Computer, Counter var SchedTxtArray = new Array("Sec(s)","Min(s)","Hour(s)","Day(s)"); var ServicesArray = new Array("PING","HTTP","FTP","SMTP","POP","DNS","USER","SQL","SNMP","TELNET","ORACLE","L_NOTES","AGENT"); var InactDaysArray = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); var SeverityArray = new Array("Normal","Caution","Critical"); var SchedState = 0; // Schedule Drop-down state var CDUnits = 0; // Schedule Units var CDCount = 1; // Schedule Count var SrvFreqState = 0; // Service Frequency Drop-down state var SrvUnits = 1; // Service Check Frequency Units var SrvCount = 1; // Service Check Frequency Count var MaxAlertsState = 0; // Max Alert Count Drop-down state var MaxAlertsCount = 0; // Max Alerts Count var SuppressMonitoringState = 0; var ObjectLUPreqd = true; // Object Lookup Required var ObjectLupRecCount = 0; // Object Lookup record counter var LastObjectName = ""; // Name of Last Object in Store var CurObjName = ""; // Name of Current Open Object var CurObjID = 0; var CurObjDesc = ""; var CurObjIx = 0; var CurCntrName = ""; // Name of Current Open Counter var CurCntrDesc = ""; var CurCntrID = 0; var CurCntrIx = 0; var CurExpCntrIx = 0; var CurCmpIx = 0; // Current Computer Counter var CmpsSelectedCount = 0; // total count of computers selected var LastCmpSelectedSuffix = null; // Last Selected Computer DIV ID suffix var Tid = null, CTid = null, WSToId = null; // Timeout ID var ReconnectEvent = false; var Hp = 82; var ServicesRecCount = 0; // Count of records returned from Services Lookup operation var SmtpServerAddress = ""; // Global Smtp Server Address for Email notifications var SmtpServerAuthStatus = "0"; // Status var SmtpServerAuthLogin = ""; // Login var SmtpServerAuthPswd = ""; // password var bdH = 0; var byM = null; var borderSz = 2; // Thin Bord is 2pixels var PuPW = "400px", PuPWu=400, PuPH = "280px", PuPHu=280, PuPCH = "190px"; var PuPATW = "300px", PuPATWu=300, PuPATCH = "160px"; var PuPOIDW = "500px", PuPOIDWu=500, PuPOIDCH = "330px"; var PuPW_EG = "600px", PuPWu_EG=600, PuPH_EG = "460px", PuPHu_EG=460; var SCbsy = false; var CCOneExpH = 0; var CCOneExpL = 0; var CollapseButtonTop = 0; var CollapseButtonLeft = 0; var ASch = ""; // Computed Alert Schedule var ASdt = ""; // Computed Start D/T var AEdt = ""; // Computed Stop D/T var AAid = ""; // Computed Array ID var LastNewName = null; var ignoreDBChangeEvent = false; var WinServicesLUPreqd = true; // Object Lookup Required var WinServicesRecCount = 0; // Object Lookup record counter var ServiceType="0", CounterType="1", EventLogType="2", UserType="3", SNMPTrapType="4", WinServicesType="5"; var FileCheckType="6", SyslogCheckType="7", ProcessCheckType="8", WatchReportType="99"; var CurrentAT = "0"; var selectImage = "sAdminAlerts.gif"; var ProgramTestInProgress = false; var DuplicateFlag = false; var AlertSelectIdx = 0; // Index of currently selected Alert var AlertStoreArr = new Array(); var AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation /* On Load tell the Comm control to Connect to the Server */ function InitRpmCC_AL() { Tid = null; //reset if ( TreeButtonsLoaded == false ) { // Have buttons been loaded? if ( plTreeButtons() == false ) { // No go set them up Tid = setTimeout("InitRpmCC_AL()",100); // Not complete, delay 100 ms. then check again return; // exit and wait } } top.MainLoaded = true; // Flag that Main is now loaded byM = 2*parseFloat(document.body.style.margin); processSizeChange(); // process initial window size initButtonState(); // set initial button states /* Create Duration dropdown selections */ dct = AL_SchedCount; dun = AL_SchedUnits; for ( var i=1; i<= 99; i++ ) { // count drop down i = ( i < 10 ) ? " "+i : i; addElementToSelect(dct," "+i); } for ( i=0; i < 3; i++ ) { // unit drop down addElementToSelect(dun,SchedTxtArray[i]); } /* Create Service Check Frequency dropdown selections */ dct = AL_SrvFreqCount; dun = AL_SrvFreqUnits; for ( i=1; i<= 59; i++ ) { // count drop down i = ( i < 10 ) ? " "+i : i; addElementToSelect(dct," "+i); } for ( i=0; i<4; i++ ) { // unit drop down addElementToSelect(dun,SchedTxtArray[i]); } /* Create Max Alerts Count dropdown selections */ dct = AL_MaxAlertsCount; for ( i=0; i<= 99; i++ ) { // count drop down i = ( i < 10 ) ? " "+i : i; addElementToSelect(dct," "+i); } /* Create Suppress Monitoring dropdown selections */ for ( i=0; i<= 6; i++ ) { // DaysOfWeek drop down addElementToSelect(AL_InactPerDaysS1,InactDaysArray[i]); addElementToSelect(AL_InactPerDaysS2,InactDaysArray[i]); addElementToSelect(AL_InactPerDaysE1,InactDaysArray[i]); addElementToSelect(AL_InactPerDaysE2,InactDaysArray[i]); } for ( i=0; i<= 23; i++ ) { // Hours drop down i = ( i < 10 ) ? "0"+i : i; addElementToSelect(AL_InactPerHours1S,""+i); addElementToSelect(AL_InactPerHours2S,""+i); addElementToSelect(AL_InactPerHours1E,""+i); addElementToSelect(AL_InactPerHours2E,""+i); } for ( i=0; i<= 59; i++ ) { // Mins drop down i = ( i < 10 ) ? "0"+i : i; addElementToSelect(AL_InactPerMins1S,""+i); addElementToSelect(AL_InactPerMins2S,""+i); addElementToSelect(AL_InactPerMins1E,""+i); addElementToSelect(AL_InactPerMins2E,""+i); } for ( i=1; i<= 64; i++ ) { // Precedence drop down i = ( i < 10 ) ? " "+i : i; addElementToSelect(AL_SLPrec," "+i); } for ( i=1; i<= 64; i++ ) { // Precedence drop down i = ( i < 10 ) ? " "+i : i; addElementToSelect(AL_ELPrec," "+i); } /* Connect to Server */ Hp = parseInt(document.body.RPMHostPort,10); RpmCC_AL.Connect(document.body.RPMHostIP,Hp, ""); } function processReconnect() { Tid = null; if ( RpmCC_AL.IsConnected() ) { Tid = setTimeout("processConnectionCheck()",60000); // Delay 30 secs then check connection return; } RpmCC_AL.Connect(document.body.RPMHostIP,Hp, ""); } function processConnectConfirmed() { // Restore Filter and Computer Store if ( ReconnectEvent == false ) { top.banner.processStartComm(); RpmCC_AL.GetGlobalSMTP(); // Request Global SMTP address RpmCC_AL.GetGlobalSMTPAuth(); // Request Global SMTP authorization status RpmCC_AL.GetGlobalBeeper(); // Request Global Pager/Beeper Port and Delay seconds processAlLookupReset(); // go do Alert Lookup ReconnectEvent = true; } top.Rstatus.Pstat("Connected"); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } Tid = setTimeout("processConnectionCheck()",60000); // Delay 30 secs then check connection } function processConnectionCheck() { Tid = null; RpmCC_AL.SendKeepAlive("Check"); Tid = setTimeout("processConnectionCheck()",60000); // Delay 30 secs then check connection } /* On Unload tell the Comm control to Disconnect from the Server */ function DiscoRpmCC_AL() { top.QuickStartProcessing = false; RpmCC_AL.Disconnect(); // Disconnect from Server top.banner.processStopCommX(); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } if ( CTid != null ) { clearTimeout(CTid); // stop timeout routine } } // Process Display View Size Change var SCbsy = false; var MomPuPW = "275px", MomPuPWu=275; var PuPFACW = "270px", PuPFACWu=270, PuPFACCH = "326px"; function processSizeChange() { if ( SCbsy ) return; SCbsy = true; // Display Height and Width bCh = document.body.clientHeight; bCw = document.body.clientWidth; // PopUp PuPLeft = (bCw-PuPWu)/2; PuPTop = (bCh-PuPHu)/2; PopUpConfirm.style.left = PuPLeft+"px"; PopUpConfirm.style.top = "85px"; //PuPTop+"px"; PopUpConfirm.style.height = PuPCH; PopUpConfirm.style.width = PuPW; PopUpEmailGroups.style.left = PuPLeft+"px"; PopUpEmailGroups.style.top = "140px"; //PuPTop+"px"; PopUpEmailGroups.style.height = PuPCH; PopUpEmailGroups.style.width = PuPW; PuPLeft = (bCw-660)/2; EmailGroupReport.style.left = PuPLeft+"px"; EmailGroupReport.style.top = "120px"; //PuPTop+"px"; EmailGroupReport.style.height = "400px"; EmailGroupReport.style.width = "660px"; PuPLeft = (bCw-660)/2; WatchReport.style.left = PuPLeft+"px"; WatchReport.style.top = "120px"; //PuPTop+"px"; WatchReport.style.height = (bCh-150)+"px"; //"400px"; WatchReport.style.width = "660px"; document.all["repwatch"].style.height = WatchReport.style.posHeight-50;//"325px"; document.all["repwatch"].style.width = "640px"; PupSLeft = (bCw-516)/2; PopUpSelectDiv.style.left = PupSLeft+"px"; PopUpSelectDiv.style.top = "40px"; //PuPTop+"px"; PopUpSelectDiv.style.height = (bCh-70)+"px"; PopUpSelectDiv.style.width = "516px"; AL_CCOneWatchReport.style.height = (bCh-120)+"px"; PuPLeft = (bCw-410)/2; PopUpEmailAddress.style.left = PuPLeft+"px"; PopUpEmailAddress.style.top = "140px"; //PuPTop+"px"; PopUpEmailAddress.style.height = "190px"; PopUpEmailAddress.style.width = "410px"; PopUpEmailText.style.left = PuPLeft+"px"; PopUpEmailText.style.top = "140px"; //PuPTop+"px"; PopUpEmailText.style.height = PuPCH; PopUpEmailText.style.width = PuPW; EGPuPLeft = (bCw-PuPWu_EG)/2-12; PopUpEmailGroupsManage.style.left = EGPuPLeft+"px"; PopUpEmailGroupsManage.style.top = "55px"; PopUpEmailGroupsManage.style.height = PuPH_EG; PopUpEmailGroupsManage.style.width = PuPW_EG; AL_EGCCOne.style.height = EGCCOneBoxHeight; AL_EGCCOne.style.overflow = (AL_EGCCOne.scrollHeight >= AL_EGCCOne.clientHeight) ? "scroll" : ""; PuPATLeft = (bCw-PuPATWu)/2; PopUpAT.style.left = PuPATLeft+"px"; PopUpAT.style.top = "235px"; //PuPTop+"px"; PopUpAT.style.height = PuPATCH; PopUpAT.style.width = PuPATW; PuPOIDLeft = (bCw-PuPOIDWu)/2; PopUpOID.style.left = PuPOIDLeft+"px"; PopUpOID.style.top = "190px"; //PuPTop+"px"; PopUpOID.style.height = PuPOIDCH; PopUpOID.style.width = PuPOIDW; PuPFACLeft = ((bCw-PuPFACWu)/2)+75; PopUpFAC.style.left = PuPFACLeft+"px"; PopUpFAC.style.top = "188px"; //PuPTop+"px"; PopUpFAC.style.height = PuPFACCH; PopUpFAC.style.width = PuPFACW; // PopUp MomPuPLeft = (bCw-MomPuPWu)/2; PopUpMoment.style.left = MomPuPLeft+"px"; PopUpMoment.style.top = "300px"; PopUpMoment.style.height = "115px"; PopUpMoment.style.width = MomPuPW; //PopUpContext Menu PopUpContextSize(bCw); CCOneExpH = bCh-(bdH+byM-borderSz)-110; CCOneExpL = (bCw > 510) ? (bCw-511)/2 : 2; //CCExpandHdr.style.left = CCOneExpL; CollapseButtonTop = CCOneExpH+70; CollapseButtonLeft = CCOneExpL; CollapseButton.style.top = CollapseButtonTop; CollapseButton.style.left = CollapseButtonLeft; if ( AL_CCOne.className == "CCOneBoxExp" ) { AL_CCOne.style.height = CCOneExpH; AL_CCOne.style.left = CCOneExpL; } else if ( AL_CCOneServ.className == "CCOneBoxExp" ) { AL_CCOneServ.style.height = CCOneExpH; AL_CCOneServ.style.left = CCOneExpL; } else if ( AL_CCOneEventLog.className == "CCOneBoxExp" ) { AL_CCOneEventLog.style.height = CCOneExpH; AL_CCOneEventLog.style.left = CCOneExpL; } else if ( AL_CCOneSNMPTrap.className == "CCOneBoxExp" ) { AL_CCOneSNMPTrap.style.height = CCOneExpH; AL_CCOneSNMPTrap.style.left = CCOneExpL; } else if ( AL_CCOneWinServ.className == "CCOneBoxExp" ) { AL_CCOneWinServ.style.height = CCOneExpH; AL_CCOneWinServ.style.left = CCOneExpL; } else if ( AL_CCOneFileCheck.className == "CCOneBoxExp" ) { AL_CCOneFileCheck.style.height = CCOneExpH; AL_CCOneFileCheck.style.left = CCOneExpL; } else if ( AL_CCOneSyslogCheck.className == "CCOneBoxExp" ) { AL_CCOneSyslogCheck.style.height = CCOneExpH; AL_CCOneSyslogCheck.style.left = CCOneExpL; } else if ( AL_CCOneProcessCheck.className == "CCOneBoxExp" ) { AL_CCOneProcessCheck.style.height = CCOneExpH; AL_CCOneProcessCheck.style.left = CCOneExpL; } SCbsy = false; } /* Initial Alert Lookup Request */ function processAlLookupReset() { /* Make sure Alert Store and Alert Name combo are flushed */ lth = AL_AlertSel.length; for (i=0; i < lth; ++i) AL_AlertSel.remove(0); AlertStoreArr.length = 0; lth = AL_DependencySel.length; for (i=0; i < lth; ++i) AL_DependencySel.remove(0); addElementToSelect(AL_DependencySel,""); AC_ServicesStoreArr.length = 0; AlertLupRecCount = 0; // clear Lookup record counter if ( RpmCC_AL.AlertGroupLookup("*") ) { ALMode = ""; top.Rstatus.Pstat("Unable to start the Watch/Alert lookup request",true); processResetButton(); } else { ALMode = "Lookup"; // set Mode of operation top.Rstatus.Pstat("One moment while Watch/Alert lookup request completes"); } } // SNMP Trap Alert New & Edit Routines function processSNMPTrapTree() { if ( ALMode == "Edit" || DuplicateFlag ) { processInitialLookup("STTCompLookup"); } else { procOIDLookup(); } if ( ALMode == "New" || ALMode == "Edit") { TrapHint.style.visibility ="visible"; } } function processOIDChoices() { PopUpOID.style.display = ""; AL_OIDName.style.display = "none"; svButtonSt(); // save button state OIDTreeIndex = 0; OIDTreeCount = 0; OID_Data.innerHTML = ""; processOIDChoicesContinue(); } function processOIDChoicesContinue() { Tid = null; var CCEs = ""; var warr = new Array(); var i = OIDTreeIndex; var j = OIDTreeCount; var loopcount = 0; for ( ; i<gOIDarray.length-1 && loopcount < 25; loopcount++, i+=4, ++j ) { warr = gOIDarray[i+3].split("'"); gOIDarray[i+3] = warr.join("`"); CCEs += "<table border='0' cellpadding='1' cellSpacing='0' width='460'><tr title='"+gOIDarray[i+3]+"'>"; CCEs += "<td width='10'></td><td width='11' align='center'><img id='oid_chk"+i; if ( gOIDarray[i] == "1" ) { CCEs += "' checked='1' src='images/Checked.gif'"; } else { CCEs += "' checked='0' src='images/Unchecked.gif'"; } CCEs += "style='cursor:hand' onclick='procOIDCmpImgClick(this)' width='9' height='9'></td>"; CCEs += "<td width='*' id='oid_nme"+i; CCEs += "' style='cursor:hand' onclick='procOIDCmpImgClick(this)' class='optext'> " + gOIDarray[i+1]+" ( "+gOIDarray[i+2]+" )" + "</td>"; CCEs += "</tr></table>"; } OID_Data.style.overflow = ( j > 14 ) ? "scroll" : ""; OID_Data.insertAdjacentHTML("beforeEnd",CCEs); OIDTreeIndex = i; OIDTreeCount = j; if ( i < gOIDarray.length-1 ) { // continue if not done Tid = setTimeout("processOIDChoicesContinue()",50); // delay 50 ms. then process Tree } } function processOID_OK() { PopUpOID.style.display = "none"; AL_OIDName.style.display = ""; reButtonSt(); // restore button state displayOIDChoices(); // display them } function processOID_Cancel() { PopUpOID.style.display = "none"; AL_OIDName.style.display = ""; reButtonSt(); // restore button state } /* Process Click to Check or Uncheck an OID */ function procOIDCmpImgClick(CmpIm) { isx = CmpIm.id; if ( isx.charAt(0) != "o") return; var cx = isx.substring(7,isx.length); // Strip off index var CObj = document.all["oid_chk"+cx]; // Clicked Check box if ( CObj.checked == "1" ) { // if currently Checked, Uncheck CObj.src = "images/Unchecked.gif"; CObj.checked = "0"; // Set Unchecked gOIDarray[parseInt(cx,10)] = "0"; } else { // otherwise Check CObj.src = "images/Checked.gif"; CObj.checked = "1"; // Set Checked gOIDarray[parseInt(cx,10)] = "1"; } } function createSNMPTrapArray() { gOIDstrg = ""; // reset // Find & create array of selected OID for ( var i=0,k=0; i<gOIDarray.length-1; i+=4 ) { if ( gOIDarray[i] == "1" ) { // if Chosen gOIDstrg += "~"+gOIDarray[i+2]; ++k; } } return ((k==0) ? false : true); } // Process SNMP Trap New After Apply Button var STADcix = -1; function processSNMPTRapAdd() { STADcix = (-1); // Index to computer array for this alert Tid = setTimeout("processSNMPTRapAddContinue()",10); // delay 10 ms. then start add } function processSNMPTRapAddContinue() { Tid= null; if ( ++STADcix < ELM_Ar.length ) { var astrg = ((AL_Suspend.checked) ? "0" :"1")+"~"+ELM_Ar[STADcix]+"~"+curAGRPID+gOIDstrg; if ( RpmCC_AL.SnmpTrapMonitorAdd(astrg) ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the SNMPTrapWatch Add request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while SNMPTrapWatch Add request completes"); } } else { processAlLookupReset(); // Done } } // Process SNMP Trap Edit After Apply Button var STCRix = -1; function processSNMPTRapEdit() { STADcix = (-1); // Index to conputer array for this alert STCRix = (-1); // Index to original SNMP Trap Computer Recs array for this alert Tid = setTimeout("processSNMPTRapEditContinue()",10); // delay 10 ms. then start add } function processSNMPTRapEditContinue() { var warr = new Array(); Tid= null; // Process all computers in the selected array if ( ++STADcix < ELM_Ar.length ) { var CID = ELM_Ar[STADcix]; // computer ID from array of selected for ( var i=0; i<SNMPTrapCompRecs.length-1; i++ ) { // process out Trap Monitor records warr = SNMPTrapCompRecs[i].split("~"); // parse each record if ( CID == warr[2] ) { // if found break; } } var astrg = ((AL_Suspend.checked) ? "0" :"1")+"~"+CID+"~"+curAGRPID+gOIDstrg; // if selected Computer found in original, do Replace if ( i<SNMPTrapCompRecs.length-1 ) { astrg = warr[0]+"~"+astrg; // prepend Rec ID for Replace warr[0] = (-1); // flag as replaced SNMPTrapCompRecs[i] = warr.join("~"); // store back if ( RpmCC_AL.SnmpTrapMonitorReplace(astrg) ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the SNMPTrapWatch Replace request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while SNMPTrapWatch Replace request completes"); } } // selected Computer not found in original, do Add else { if ( RpmCC_AL.SnmpTrapMonitorAdd(astrg) ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the SNMPTrapWatch Add request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while SNMPTrapWatch Add request completes"); } } } // Next, delete any original computer records not replaced else if ( ++STCRix < SNMPTrapCompRecs.length-1 ) { warr = SNMPTrapCompRecs[STCRix].split("~"); // parse each record if ( warr[0] != (-1) ) { // if to be deleted if ( RpmCC_AL.SnmpTrapMonitorDelete(warr[0]) ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the SNMPTrapWatch Delete request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while SNMPTrapWatch Delete request completes"); } } else { Tid = setTimeout("processSNMPTRapEditContinue()",5); // delay 5 ms. then check next } } // Done else { // Insure Service Checking is Enabled //if ( RpmCC_AL.StartStopServicesCheck("1") ) { // if unable to initiate request // top.Rstatus.Pstat("Unable to restart the SERVICES Checking",true); //} ALMode = ""; // reset finishEditComplete(); } } // Process SNMP Trap Delete function processSNMPTrapDelete(AID) { AGIDtdel= AID; // save AGid to delete // Find SNMP Trap Computer records for this AGid if ( RpmCC_AL.SnmpTrapMonitorFindByAGId(AID) ) { // if unable to initiate request ALupMode = ""; PINP_Bsy = false; top.Rstatus.Pstat("Unable to start the SNMPTrapWatch Server/Device lookup request",true); } else { ALupMode = "SNMPTrapComputerDlete"; // Mode top.Rstatus.Pstat("One moment while SNMPTrapWatch Server/Device lookup request completes"); } } // Process Read of SNMP Trap Monitors by AGId var STCRdix = -1; var AGIDtdel = null; function processSNMPTrapComputersDelete(coidstrg) { SNMPTrapCompRecs = coidstrg.split(";"); // parse out the Trap Monitor Computer records STCRdix = -1; // initialize index Tid = setTimeout("processSNMPTrapComputersDeleteContinue()",10); // delay 10 ms. then start delete } function processSNMPTrapComputersDeleteContinue() { var warr = new Array; Tid = null; if ( ++STCRdix < SNMPTrapCompRecs.length-1 ) { // delete a Trap Monitor records warr = SNMPTrapCompRecs[STCRdix].split("~"); // parse each record if ( RpmCC_AL.SnmpTrapMonitorDelete(warr[0]) ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the SNMPTrapWatch Delete request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while SNMPTrapWatch Delete request completes"); } } // Done deleting records, now delete AG else { if ( RpmCC_AL.AlertGroupDelete(AGIDtdel) ) { top.Rstatus.Pstat("Unable to start the DELETE request",true); processResetButton(); } else { // waiting for OperationCompleteEvent ignoreDBChangeEvent = true; top.Rstatus.Pstat("One moment while DELETE request completes"); } } } // SNMP Trap OID Routines function procOIDLookup() { // Get OID definitions if ( RpmCC_AL.EnumOidDefs() ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the OID lookup request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while OID lookup request completes"); } } var gOIDstrg = ""; var gOIDarray = new Array(); function processOIDLookupRecord(OIDstrg) { gOIDstrg = OIDstrg; // save gOIDarray = OIDstrg.split("~"); // parse var gset = ( ALMode == "New" ) ? "0" : "0"; for ( var i=0; i<gOIDarray.length-1; i+=4 ) { gOIDarray[i] = gset; // default to none selected if New } displayOIDChoices(); // display them processInitialLookup("STTCompLookup"); } function displayOIDChoices() { if ( CurSelTab == "CounterTab" ) { AL_OIDName.innerHTML = ""; // clear addElementToSelect(AL_OIDName,"List of SNMP Trap OIDs for this Watch/Alert..."); addElementToSelect(AL_OIDName,"___________________________________"); for ( var i=0; i<gOIDarray.length-1; i+=4 ) { if ( gOIDarray[i] == "1" ) { // if Chosen addElementToSelect(AL_OIDName,gOIDarray[i+1]+" ( "+gOIDarray[i+2]+" )"); } } } } function processOID_New() { OID_Select.style.display = "none"; OID_Define.style.display = ""; if ( processOIDCheck() ) { AL_nOIDNme.focus(); } else { AL_nOIDId.focus(); } } function processOIDCheck() { if ( AL_nOIDAdd.checked ) { AL_nOIDNme.className = ""; AL_nOIDNme.disabled = ""; AL_nOIDDesc.className = ""; AL_nOIDDesc.disabled = ""; return true; } else { AL_nOIDNme.value = "" AL_nOIDNme.className = "idis"; AL_nOIDNme.disabled = "disabled"; AL_nOIDDesc.value = "" AL_nOIDDesc.className = "idis"; AL_nOIDDesc.disabled = "disabled"; return false; } } function processOID_newOK() { if ( AL_nOIDId.value == "" ) { alert("Please enter an SNMP Trap OID!"); AL_nOIDId.focus(); return; } if ( AL_nOIDAdd.checked ) { // Add OID Def to Dictionary if ( AL_nOIDNme.value == "" ) { alert("Please enter an SNMP Trap Name!"); AL_nOIDNme.focus(); return; } OID_Select.style.display = ""; OID_Define.style.display = "none"; // Add OID Def to Dictionary if ( RpmCC_AL.OidDefs("1","0",AL_nOIDNme.value+"~"+AL_nOIDId.value+"~"+AL_nOIDDesc.value) ) { top.Rstatus.Pstat("Unable to start the OID update request",true); } else { top.Rstatus.Pstat("One moment while OID is added to the Definition Dictionary"); } } else { OID_Select.style.display = ""; OID_Define.style.display = "none"; processCustomOID(); } } function processOIDDict(DRstat) { var warr = new Array(); warr = DRstat.split("~") if ( warr[1] == "0" ) { //if successful processCustomOID(); } else { alert("Error updating OID dictionary: "+warr[1]); processOID_New(); // go retry } } function processCustomOID() { //add to array var i = gOIDarray.length-1; gOIDarray[i++] = "1"; gOIDarray[i++] = AL_nOIDNme.value; gOIDarray[i++] = AL_nOIDId.value; gOIDarray[i++] = AL_nOIDDesc.value; gOIDarray[i++] = "1"; //pseudo value reButtonSt(); // restore button state processOIDChoices(); top.Rstatus.Pstat("Done"); } function processOIDNewRead() { gOIDstrg = OIDstrg; // save gOIDarray = OIDstrg.split("~"); // parse var gset = ( ALMode == "New" ) ? "1" : "0"; for ( var i=0; i<gOIDarray.length-1; i+=4 ) { gOIDarray[i] = gset; // default to all selected if New } displayOIDChoices(); // display them } function processOID_newCancel() { OID_Select.style.display = ""; OID_Define.style.display = "none"; } // Get OIDs and Computers for this Alert Group function processPopulateSNMPTrapComputers() { if ( gOIDarray.length == 0 ) { procOIDLookup(); // get OIDs } else { for ( var k=0; k<gOIDarray.length-1; k+=4 ) { gOIDarray[k] = "0"; // reset } processSNMPTrapPopIn(""); } } // Continue here after OID Lookup function processSNMPTrapPopIn(OIDstrg) { if ( OIDstrg != "" ) { gOIDstrg = OIDstrg; // save gOIDarray = OIDstrg.split("~"); // parse for ( var i=0; i<gOIDarray.length-1; i+=4 ) { gOIDarray[i] = "0"; // default to none selected } } if ( RpmCC_AL.SnmpTrapMonitorFindByAGId(curAGRPID) ) { // if unable to initiate request ALupMode = ""; PINP_Bsy = false; top.Rstatus.Pstat("Unable to start the SNMPTrapWatch Server/Device lookup request",true); } else { CountOfComps = CountOfCompsRcvd = 0; CompIdLupArr = ""; // Computer Id Array ALupMode = "SNMPTrapComputerLookupPopIn"; // Mode top.Rstatus.Pstat("One moment while SNMPTrapWatch Server/Device lookup request completes"); } } // Process Read of SNMP Trap Monitors by AGId var SNMPTrapCompRecs = new Array(); function processPopulateSNMPTrapComputersContinue(coidstrg) { var warr1 = new Array(); var warr2 = new Array(); warr1 = coidstrg.split("~"); warr2 = warr1[1].split(":"); if ( warr2[0] == "Err" ) { ALupMode = ""; PINP_Bsy = false; top.Rstatus.Pstat("Unsuccessful Lookup; "+warr1[1],true); return; } SNMPTrapCompRecs = coidstrg.split(";"); // parse out the Trap Monitor Computer records for ( var i=0; i<SNMPTrapCompRecs.length-1; i++ ) { // process out Trap Monitor records ++CountOfCompsRcvd; warr1 = SNMPTrapCompRecs[i].split("~"); // parse each record if ( i == 0 ) { // if first one, get OIDs AL_Suspend.checked = (warr1[1] == "0") ? "checked" :""; for ( var j=4; j<warr1.length; j++ ) { // for each OID, enable for display for ( var k=0; k<gOIDarray.length-1; k+=4 ) { if ( gOIDarray[k+2] == warr1[j] ) { // find it gOIDarray[k] = "1"; // enable for display break; } } if ( k >= gOIDarray.length-1 ) { //if not found, add to array k = gOIDarray.length-1; gOIDarray[k++] = "1"; gOIDarray[k++] = ""; gOIDarray[k++] = warr1[j]; gOIDarray[k++] = ""; gOIDarray[k++] = "1"; //pseudo value } } displayOIDChoices(); // display them } else { CompIdLupArr += ","; // Computer Id Array } CompIdLupArr += warr1[2]; // Computer Id Array } AL_CCOneSNMPTrap.style.overflow = ( CountOfCompsRcvd > 9 ) ? "scroll" : ""; processPopulateCounterInputComplete(); } // Event Log Alert Routines function processELTree() { processInitialLookup("ELCompLookup"); } function processFileCheckTree() { processInitialLookup("FCCompLookup"); } function processSyslogCheckTree() { processInitialLookup("SLCompLookup"); } function processProcessCheckTree() { processInitialLookup("PCCompLookup"); } function processFilterSet() { } function processSpecifyButton() { // Set selected computers if Edit mode if ( ALMode == "Edit" ) { if ( CurrentAT == WinServicesType ) { processWSTEdit(); } else { // preset not selected for ( var j=0; j<AC_CompStoreArr.length; j+=CompRecLength ) { AC_CompStoreArr[j+4] = "0"; } var cluparr = new Array(); // get selected Computer IDs cluparr = CompIdLupArr.split(","); for ( var i=0; i<cluparr.length; i++ ) { // for each selected Computer, find it and set selected for ( j=0; j<AC_CompStoreArr.length; j+=CompRecLength ) { if ( cluparr[i] == AC_CompStoreArr[j] ) { AC_CompStoreArr[j+4] = "1"; // set selected break; } } } } } if ( !(ALMode == "Edit" && CurrentAT == WinServicesType) ) { if ( lima0.expanded == "0" ) { // expand first group if necessary procGrpImgClick(lima0,true); } } SetButtonState(UUpdateButton,"0"); SetButtonState(UResetButton,"0"); top.Rstatus.Pstat("Done"); } /* Get only the Alert Name from Store based on Alert ID */ function getOnlyAlertName(AgID) { var AlertName = ""; for (i=0, j=0; i < AlertStoreArr.length; ++j, i+=AlertRecLength) { if ( AlertStoreArr[i+1] == AgID ) { AlertName = AlertStoreArr[i]; break; } } return AlertName; } // Do nothing click handler for in use Computer function procDoNothing() { return; } function processPLocClick() { if ( document.RunPrgmRadio.AL_PLoc[2].checked ) { AL_ExecP.className = "idis"; AL_ArgsP.className = "idis"; } else { AL_ExecP.className = ""; AL_ArgsP.className = ""; } } function GoStartIPServiceLookup() { // Do Services Lookup ServicesRecCount = 0; // reset count ALMode = "ServicesLookup"; rstat = RpmCC_AL.ServicesLookup("","","ComputerID,ID DESC"); if ( rstat ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the IP Services lookup request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while IP Services lookup request completes"); } } /* Process Alert/Object OP Complete Event */ var updSrvcName = ""; function processAlertOpComplete() { var wrkarr = new Array(); top.Rstatus.Pstat("Request Completed"); if (ALMode == "Lookup") { // Win Services Lookup if ( WinServicesLUPreqd ) { ALMode = "WinServicesLookup"; WinServicesArr.length = 0; // reset Array rstat = RpmCC_AL.NTServicesListLookupId("0"); if ( rstat ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the WinServicesWatch lookup request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while WinServicesWatch lookup request completes"); } } else { GoStartIPServiceLookup(); // Start IP Services Lookup } } else if (ALMode == "ObjectLookup") { rss = ""; // default null status message if (AlertLupRecCount == 0) { // check if any Alert Group records found rss += "No records found for Watch/Alert lookup"; } if (ServicesRecCount == 0) { // check if any Service records found if ( rss.length > 0 ) { rss += " & for IP Services lookup"; } else { rss = "No records found for IP Services lookup"; } } if (ObjectLupRecCount == 0) { // check if any Object records found if ( rss.length > 0 ) { rss += " & for Object/Counter lookup"; } else { rss = "No records found for Object/Counter lookup"; } } else { /* Get name of Last Object in Store */ LastObjectName = AL_OCStoreArr[(ObjectLupRecCount-1)*ObjectRecLength]; ObjectLUPreqd = false; } if ( rss.length > 0 ) { top.Rstatus.Pstat(rss); } else { top.Rstatus.Pstat("Done"); } processGoodResetButton(); } else if (ALMode == "Edit") { /* update the Storage */ if ( CurrentAT == CounterType || CurrentAT == UserType ) { // if Counter or User or EventLog checked ALMode = ""; finishEditComplete(); } else if ( CurrentAT == EventLogType ) { // if unable to initiate request if ( RpmCC_AL.ELMonitorDelAllByAlertGroupID(curAGRPID) ) { top.Rstatus.Pstat("Unable to update the EventLogWatch",true); processResetButton(); } else { // waiting for OperationCompleteEvent ALupMode = "ELMDelAll"; top.Rstatus.Pstat("One moment while UPDATE request completes"); processGeneralClick(CounterTab); } } else if ( CurrentAT == SNMPTrapType ) { ALupMode = "SNMPTrapEdit"; processSNMPTRapEdit(); } else if ( CurrentAT == WinServicesType ) { ALupMode = "WSMonitorEdit"; WSM_ArIndex = 0; processWSMonitorEdit(); } else if ( CurrentAT == FileCheckType ) { ALupMode = "FileCheckEdit"; processFileCheckEdit(); } else if ( CurrentAT == ProcessCheckType ) { ALupMode = "ProcessCheckEdit"; processProcessCheckEdit(); } else if ( CurrentAT == SyslogCheckType ) { ALupMode = "SyslogCheckEdit"; processSyslogCheckEdit(); } else { // Service Alert edit // Sort CompIDs and reform to a string wrkarr = CompIdLupArr.split(","); wrkarr = wrkarr.sort(); // sort Computer IDs CompIdLupArr = wrkarr.join(","); updSrvcName = (curSrvcName == "SQL") ? "SQLCONNECT" : curSrvcName; // Disable Specified Services to be checked if ( RpmCC_AL.ServicesAlertDisabled(updSrvcName,curAGRPID,CompIdLupArr) ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the UPDATE request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while UPDATE request completes"); processGeneralClick(CounterTab); } } } else if (ALMode == "Delete") { /* update the Storage */ var i = AlertRecLength*AlertSelectIdx; for (var j = i+AlertRecLength; j < AlertStoreArr.length; ++i, ++j) { AlertStoreArr[i] = AlertStoreArr[j]; } AlertStoreArr.length -= AlertRecLength; if ( CurrentAT == ServiceType ) { // if Service Alert // Reset orig settings for ( var i=0; i<AC_ServicesStoreArr.length; i+=ServicesRecLength ) { if ( AC_ServicesStoreArr[i+1] == curAGRPID ) { AC_ServicesStoreArr[i+1] = 0; // clear Alert Group ID } } } AL_AlertSel.remove(AlertSelectIdx); if (AL_AlertSel.length == 0) { // if no more Alerts AL_Desc.value = ""; // clear Description field AL_Thrsh.value = ""; // clear Threshold field AL_Dur.value = ""; // clear Duration field AL_ExecP.value = ""; // clear Execute Program field AL_ArgsP.value = ""; // clear Program Args field AL_EAddr.value = ""; // clear Email Addr field AL_ESubj.value = ""; // clear Email Subj field AL_TUnder.checked = ""; AL_EveryT.checked = ""; AL_RunIt.checked = ""; AL_ENotify.checked = ""; AlertLupRecCount = 0; // clear Lookup record counter } processGoodResetButton(); } else { // ALMode New /* Reset for next */ processAlLookupReset(); } } // Finish the Edit Op Complete processing function finishEditComplete() { updateStore(AlertSelectIdx); processCommonReset(); // common button and field reset populateInput(AlertRecLength*AlertSelectIdx); // set input fields AL_AlertSel.disabled = ""; if ( AL_AlertSel.style.visibility != "hidden" ) { AL_AlertSel.focus(); } } // Process Alert/Object OP Complete Event function processAlertAddOpComplete(nagid) { if ( CurrentAT == CounterType || CurrentAT == UserType ) { // if Counter or User checked top.Rstatus.Pstat("Request Completed"); processAlLookupReset(); return; } curAGRPID = nagid; // update current Alert Group ID if ( CurrentAT == EventLogType ) { ALupMode = "ELMonitorAdd"; processELMonitorAdd(); } else if ( CurrentAT == SNMPTrapType ) { ALupMode = "SNMPTrapAdd"; processSNMPTRapAdd(); } else if ( CurrentAT == WinServicesType ) { ALupMode = "WSMonitorAdd"; WSM_ArIndex = 0; processWSMonitorAdd(""); } else if ( CurrentAT == FileCheckType ) { ALupMode = "FileCheckAdd"; processFileCheckAdd(); } else if ( CurrentAT == ProcessCheckType ) { ALupMode = "ProcessCheckAdd"; processProcessCheckAdd(); } else if ( CurrentAT == SyslogCheckType ) { ALupMode = "SyslogCheckAdd"; processSyslogCheckAdd(); } // go update the Enabled Services Alert else { // Services ALMode = "ServicesAdd"; processServicesAlertEnable(nagid); } } /* Process common button and field reset items */ function processCommonReset() { AL_Desc.className = "idis"; AL_Thrsh.className = "idis"; AL_Dur.className = "idis"; AL_Sched.className = "idis"; AL_SrvFreq.className = "idis"; AL_MaxAlerts.className = "idis"; AL_Dependency.className = "idis"; AL_InactPer1.className = "idis"; AL_InactPer2.className = "idis"; AL_CWRestore.className = "idis"; AL_CWRestore.disabled = "disabled"; AL_WASeverity.style.display = ""; AL_WASeveritySel.style.display = "none"; AL_EvSrc.className = "idis"; AL_EvID.className = "idis"; AL_EvCat.className = "idis"; AL_EvMsg.className = "idis"; AL_LogAnd.className = "idis"; AL_LogAnd.disabled = "disabled"; AL_LogExclude.className = "idis"; AL_LogExclude.disabled = "disabled"; AL_LogNot.className = "idis"; AL_LogNot.disabled = "disabled"; AL_LogName.style.display = ""; AL_LogNameSel.style.display = "none"; AL_LogType.style.display = ""; AL_LogTypeSel.style.display = "none"; AL_ELPrec.className = "idis"; AL_ELPrec.disabled = "disabled"; AL_FileAnd.className = "idis"; AL_FileAnd.disabled = "disabled"; AL_FileNot.className = "idis"; AL_FileNot.disabled = "disabled"; //AL_FCPrec.className = "idis"; //AL_FCPrec.disabled = "disabled"; AL_FileInterval.className = "idis"; AL_MemCheck.className = "idis"; AL_HDDCheck.className = "idis"; SrvcHint.style.visibility ="hidden"; CounterHint.style.visibility ="hidden"; TrapHint.style.visibility ="hidden"; OIDChoiceButton.style.display = "none"; AL_OIDName.className = "idis"; AL_FileCheckPath.className = "idis"; AL_FileCheckString.className = "idis"; AL_FileCheckSize.className = "idis"; AL_DeltaSize.className = "idis"; AL_DeltaSize.disabled = "disabled"; AL_DeltaDT.className = "idis"; AL_DeltaDT.disabled = "disabled"; AL_ProcessPath.className = "idis"; AL_ProcessName.className = "idis"; ProcCPUMax.className = "idis"; ProcMemory.className = "idis"; ProcPP.className = "idis"; ProcNPP.className = "idis"; ProcPF.className = "idis"; ProcInstanceCount.className = "idis"; ProcDuration.className = "idis"; ProcExclWildCard.className = "idis"; ProcNotifyOnly.className = "idis"; ProcNotifyOnly.disabled = "disabled"; ProcRestart.className = "idis"; ProcRestart.disabled = "disabled"; ProcTerminate.className = "idis"; ProcTerminate.disabled = "disabled"; PCEnumButton.style.visibility = "hidden"; ProcRunningRadio[0].disabled = "disabled"; ProcRunningRadio[1].disabled = "disabled"; ProcRunningRadio[0].className = "idis"; ProcRunningRadio[1].className = "idis"; AL_SLFacility.className = "idis"; AL_SLSeverity.className = "idis"; AL_SLTag.className = "idis"; AL_SLContent.className = "idis"; AL_SLAnd.className = "idis"; AL_SLAnd.disabled = "disabled"; AL_SLPrec.className = "idis"; AL_SLPrec.disabled = "disabled"; FACButton.style.visibility = "hidden"; SEVButton.style.visibility = "hidden"; AL_ExecP.className = "idis"; AL_ArgsP.className = "idis"; AL_EAddr.className = "idis"; AL_ESubj.className = "idis"; AL_PhoneNbr.className = "idis"; AL_AccessNbr.className = "idis"; AL_PagePswd.className = "idis"; AL_TTSpeak.className = "idis"; AL_BeeperNbr.className = "idis"; AL_TTSend.className = "idis"; AL_TUnder.className = "idis"; AL_EveryT.className = "idis"; AL_Suspend.className = "idis"; AL_RunIt.className = "idis"; AL_ENotify.className = "idis"; AL_Phone.className = "idis"; AL_Beeper.className = "idis"; AL_TUnder.disabled = "disabled"; AL_EveryT.disabled = "disabled"; AL_Suspend.disabled = "disabled"; AL_RunIt.disabled = "disabled"; AL_ENotify.disabled = "disabled"; AL_Phone.disabled = "disabled"; AL_Beeper.disabled = "disabled"; AL_Dependency.style.display = ""; AL_DependencySel.style.display = "none"; document.RunPrgmRadio.AL_PLoc[0].className = "idis"; document.RunPrgmRadio.AL_PLoc[1].className = "idis"; document.RunPrgmRadio.AL_PLoc[2].className = "idis"; document.RunPrgmRadio.AL_PLoc[0].disabled = "disabled"; document.RunPrgmRadio.AL_PLoc[1].disabled = "disabled"; document.RunPrgmRadio.AL_PLoc[2].disabled = "disabled"; document.WinSrvcRadio.AL_WinSrvcDisp[0].disabled = "disabled"; document.WinSrvcRadio.AL_WinSrvcDisp[1].disabled = "disabled"; document.WinSrvcRadio.AL_WinSrvcDisp[0].className = "idis"; document.WinSrvcRadio.AL_WinSrvcDisp[1].className = "idis"; AL_WSRestart.disabled = "disabled"; AL_WSRestart.className = "idis"; WSTSelect.style.visibility = "hidden"; WinSrvcRadioDisplay.style.visibility = "hidden"; bIPSelC.style.visibility = "hidden"; bIPUselC.style.visibility = "hidden"; bIPSelE.style.visibility = "hidden"; bIPUselE.style.visibility = "hidden"; bELSelC.style.visibility = "hidden"; bELUselC.style.visibility = "hidden"; bSTSelC.style.visibility = "hidden"; bSTUselC.style.visibility = "hidden"; bFCSelC.style.visibility = "hidden"; bFCUselC.style.visibility = "hidden"; bPCSelC.style.visibility = "hidden"; bPCUselC.style.visibility = "hidden"; bSLSelC.style.visibility = "hidden"; bSLUselC.style.visibility = "hidden"; /* enable and disable appropriate buttons */ //SetButtonState(UNewButton,"0"); SetButtonState(UUpdateButton,"1"); SetButtonState(UResetButton,"1"); /* enable appropriate Alert Name fields */ AL_Alert.style.display = "none"; AL_AlertSel.style.display = ""; } function processKeyPress() { /* get KeyCode and check if invalid */ kc = event.keyCode; stat = 1; // default to OK // Keys: ~ % [ ] # ! if (kc == 126 || kc == 37 || kc == 91 || kc == 93 /*|| kc == 35*/ || kc == 33) { // Not acceptable stat = 0; } // Keys: * ? else if ( (/*kc == 42 ||*/ kc == 63) && event.srcElement.name != "AL_Alert" ) { //Not acceptable stat = 0; } if (stat == 0) { // if Not Acceptable event.returnValue=false; //top.Rstatus.Pstat("Keys ~%*?[]#! are not accepted for this field"); top.Rstatus.Pstat("Keys ~%?[]! are not accepted for this field"); alert("Keys ~%?[]! are not accepted for this field"); } else { top.Rstatus.Pstat(""); // clear status line } } // Process Serverices LOOKUP Record Event var ServicesRecLength = 4; // Services Lookup record length var AC_ServicesStoreArr = new Array(); function processServicesRecord(SRVstrg) { var warr = new Array(); warr = SRVstrg.split("~"); var j = ServicesRecCount * ServicesRecLength; AC_ServicesStoreArr[j] = warr[1]; // Computer ID AC_ServicesStoreArr[j+1] = warr[2]; // AlertGroup ID warr[3] = (warr[3] == "SQLCONNECT") ? "SQL" : warr[3]; AC_ServicesStoreArr[j+2] = warr[3]; // Type AC_ServicesStoreArr[j+3] = SRVstrg; ++ServicesRecCount; // bump record counter } // Prcoess Services Operation Complete Event function processServicesOpComplete() { if (ALMode == "ServicesLookup") { if ( ObjectLUPreqd ) { // Need to Lookup Objects ObjectLupRecCount = 0; // clear Lookup record counter AL_OCStoreArr.length = 0; if ( RpmCC_AL.ObjectLookupForObjCompArray("*") ) { ALMode = ""; top.Rstatus.Pstat("Unable to start the Object lookup request",true); } else { ALMode = "ObjectLookup"; // set Mode of operation top.Rstatus.Pstat("One moment while Object lookup request completes"); return; } } processGoodResetButton(); } else if (ALMode == "ServicesAdd") { ALMode = ""; // reset mode processAlLookupReset(); if ( top.QuickStartProcessing ) { alert("When finished, exit this 'Configure Watches/Alerts' screen and continue with the 'QuickStart' steps screen. Next, you will show the ServerWatch Status display of the Servers/Computers you are now monitoring"); top.QuickStartProcessing = false; } } else if (ALMode == "ServicesEdit") { ALMode = ""; // reset mode finishEditComplete(); } else if (ALMode == "Edit") { // go update the Enabled Services Alert ALMode = "ServicesEdit"; processServicesAlertEnable(curAGRPID); } else if (ALMode == "New") { /* Reset for next */ processAlLookupReset(); } } var FreqArg = ""; // initialize function processServicesAlertEnable(agid) { var wrkarr = new Array(); var sortarr = new Array(); FreqArg=""; // initailize // Determine Frequency parameters argument for ( var i=0; i<4; i++ ) { FreqArg += ( i == SrvUnits ) ? SrvCount : "0"; FreqArg += ","; } FreqArg += ( AL_Suspend.checked ) ? "1" : "0"; // determine Suspend flag if ( updSrvcName == "AGENT" ) { FreqArg += ","; FreqArg += AL_MemCheck.value; FreqArg += ","; FreqArg += AL_HDDCheck.value; } // Sort CompIDs and reform to a string wrkarr = SrvCIDArr.split(","); wrkarr = wrkarr.sort(); // sort Computer IDs sortarr = wrkarr.join(","); // Add Services to be checked updSrvcName = (curSrvcName == "SQL") ? "SQLCONNECT" : curSrvcName; if ( RpmCC_AL.ServicesAlertEnabled(updSrvcName,FreqArg,agid,sortarr) ) { // if unable to initiate request top.Rstatus.Pstat("Unable to start the UPDATE request",true); processResetButton(); } else { // waiting for OperationCompleteEvent top.Rstatus.Pstat("One moment while UPDATE request completes"); processGeneralClick(CounterTab); } } /* Process Object Lookup Record Event */ var ObjectRecLength = 3; // Object Lookup record length var AL_OCStoreArr = new Array(); function processObjectLookup(ONme,ODesc,OCIdA) { var i = ObjectLupRecCount * ObjectRecLength; AL_OCStoreArr[i++] = ONme; AL_OCStoreArr[i++] = ODesc; AL_OCStoreArr[i] = OCIdA; ++ObjectLupRecCount; // bump record received counter } /* Process Counter Lookup Record Event */ function processCounterLookup(CN,CD,OA) { /* If PopulateInput, Go process */ if (ALupMode == "CounterLookupPopIn") { processPopulateInputCounter(CN,CD,OA); } /* If Counter Edit, Go process */ else if (ALupMode == "CounterLookupEdit") { processEditCounter(CN,CD,OA); } } /* Process Computer Lookup Record Event */ function processComputerLookup(Cid,CNme,CDesc) { /* If PopulateInput, Go process */ if (ALupMode == "ComputerLookupPopIn") { ++CountOfCompsRcvd; processPopulateInputComputer(CNme,CDesc,Cid); } if (ALupMode == "ComputerLookupEdit") { processEditComputer(CNme,CDesc,Cid); } if (ALupMode == "SrvComputerLookupEdit") { processEditSrvComputer(CNme,CDesc,Cid); } } /* Process Click on Duration Field */ function processSchedClick() { if ( document.all.AL_Sched.className == "idis" ) { return; } if ( SchedState == "0") { // if closed SchedState = "1"; document.all.SchedIn.style.display = "none"; document.all.SchedDD.style.display = ""; document.all.AL_SchedCount.options[CDCount-1].selected = "selected"; document.all.AL_SchedUnits.options[CDUnits].selected = "selected"; } else { SchedState = "0"; // closed CDUnits = document.all.AL_SchedUnits.selectedIndex; CDCount = document.all.AL_SchedCount.selectedIndex+1; document.all.SchedIn.style.display = ""; document.all.SchedDD.style.display = "none"; document.all.AL_Sched.value = " " + CDCount + " " + SchedTxtArray[CDUnits]; } } /* Process Click on Service Check Frequency Field */ function processSrvFreqClick() { if ( document.all.AL_SrvFreq.className == "idis" ) { return; } if ( SrvFreqState == "0") { // if closed SrvFreqState = "1"; document.all.FreqIn.style.display = "none"; document.all.FreqDD.style.display = ""; document.all.AL_SrvFreqCount.options[SrvCount-1].selected = "selected"; document.all.AL_SrvFreqUnits.options[SrvUnits].selected = "selected"; } else { SrvFreqState = "0"; // closed SrvUnits = document.all.AL_SrvFreqUnits.selectedIndex; SrvCount = document.all.AL_SrvFreqCount.selectedIndex+1; document.all.FreqIn.style.display = ""; document.all.FreqDD.style.display = "none"; document.all.AL_SrvFreq.value = " " + SrvCount + " " + SchedTxtArray[SrvUnits]; } } /* Process Click on Max Alerts Field */ function processMaxAlertsClick() { if ( AL_MaxAlerts.className == "idis" ) { return; } if ( MaxAlertsState == "0") { // if closed MaxAlertsState = "1"; AL_MaxAlerts.style.display = "none"; MaxAlertsDD.style.display = ""; AL_MaxAlertsCount.options[MaxAlertsCount].selected = "selected"; } else { MaxAlertsState = "0"; AL_MaxAlerts.style.display = ""; MaxAlertsDD.style.display = "none"; MaxAlertsCount = AL_MaxAlertsCount.selectedIndex; AL_MaxAlerts.value = " " + MaxAlertsCount; } } /* Process Click on Suppress Monitoring Field */ var Suppress1 = new Array(); var Suppress2 = new Array(); function processInactivePeriodsClick() { if ( AL_InactPer1.className == "idis" ) { return; } if ( SuppressMonitoringState == "0") { // if closed SuppressMonitoringState = "1"; InactPer.style.display = "none"; InactPerDD.style.display = ""; AL_InactPerDaysS1.selectedIndex = Suppress1[0]; AL_InactPerDaysE1.selectedIndex = Suppress1[1]; AL_InactPerHours1S.selectedIndex = Suppress1[2]; AL_InactPerHours1E.selectedIndex = Suppress1[3]; AL_InactPerMins1S.selectedIndex = Suppress1[4]; AL_InactPerMins1E.selectedIndex = Suppress1[5]; AL_InactPerDaysS2.selectedIndex = Suppress2[0]; AL_InactPerDaysE2.selectedIndex = Suppress2[1]; AL_InactPerHours2S.selectedIndex = Suppress2[2]; AL_InactPerHours2E.selectedIndex = Suppress2[3]; AL_InactPerMins2S.selectedIndex = Suppress2[4]; AL_InactPerMins2E.selectedIndex = Suppress2[5]; } else { SuppressMonitoringState = "0"; InactPer.style.display = ""; InactPerDD.style.display = "none"; Suppress1[0] = AL_InactPerDaysS1.selectedIndex; Suppress1[1] = AL_InactPerDaysE1.selectedIndex; Suppress1[2] = AL_InactPerHours1S.selectedIndex; Suppress1[3] = AL_InactPerHours1E.selectedIndex; Suppress1[4] = AL_InactPerMins1S.selectedIndex; Suppress1[5] = AL_InactPerMins1E.selectedIndex; processInactPer1Value(); // go set value Suppress2[0] = AL_InactPerDaysS2.selectedIndex; Suppress2[1] = AL_InactPerDaysE2.selectedIndex; Suppress2[2] = AL_InactPerHours2S.selectedIndex; Suppress2[3] = AL_InactPerHours2E.selectedIndex; Suppress2[4] = AL_InactPerMins2S.selectedIndex; Suppress2[5] = AL_InactPerMins2E.selectedIndex; processInactPer2Value(); // go set value } } function processInactPer1Value() { if ( Suppress1.join(",") == "0,0,0,0,0,0" ) { AL_InactPer1.value = ""; } else { AL_InactPer1.value = InactDaysArray[ Suppress1[0] ]; AL_InactPer1.value += "-"+InactDaysArray[ Suppress1[1] ]; AL_InactPer1.value += " "+ ((Suppress1[2] < 10) ? "0"+Suppress1[2] : Suppress1[2]); AL_InactPer1.value += ":"+ ((Suppress1[4] < 10) ? "0"+Suppress1[4] : Suppress1[4]); AL_InactPer1.value += " - "+ ((Suppress1[3] < 10) ? "0"+Suppress1[3] : Suppress1[3]); AL_InactPer1.value += ":"+ ((Suppress1[5] < 10) ? "0"+Suppress1[5] : Suppress1[5]); } } function processInactPer2Value() { if ( Suppress2.join(",") == "0,0,0,0,0,0" ) { AL_InactPer2.value = ""; } else { AL_InactPer2.value = InactDaysArray[ Suppress2[0] ]; AL_InactPer2.value += "-"+InactDaysArray[ Suppress2[1] ]; AL_InactPer2.value += " "+ ((Suppress2[2] < 10) ? "0"+Suppress2[2] : Suppress2[2]); AL_InactPer2.value += ":"+ ((Suppress2[4] < 10) ? "0"+Suppress2[4] : Suppress2[4]); AL_InactPer2.value += " - "+ ((Suppress2[3] < 10) ? "0"+Suppress2[3] : Suppress2[3]); AL_InactPer2.value += ":"+ ((Suppress2[5] < 10) ? "0"+Suppress2[5] : Suppress2[5]); } } /* Close Calendar Fields if opened */ function closeCalendarTimeFields() { if ( SchedState == "1" ) { // if Schedule opened processSchedClick(); // close it } if ( SrvFreqState == "1" ) { // if ServiceFrequency opened processSrvFreqClick(); // close it } if ( MaxAlertsState == "1" ) { // if Max Alert Count opened processMaxAlertsClick(); // close it } } /* Process DB Error in Services Lookup Operation */ function processServicesOpError() { alert("An error occurred during a Services operation"); processResetButton(); // reset } var UNewSv,UEditSv,UDelSv,UUpSv,UResSv,UDupSv; var SMTPAddrCancel = false; var sWASeverity = ""; function processSmtpServer() { var wrk = new Array(); wrk = SmtpServerAddress.split("~"); // change the "~" to ";" PopUpConfirm.style.display=""; // enable Smtp Confirm pop-up SetButtonState(SMTPAddrOKButton,"0"); SMTPAddrCancel = false; GlobalSmtp.value = wrk.join("; "); // prime the fields GlobalFrom.value = AL_OrigDomain.value; GlobalSmtp.focus(); sWASeverity = AL_WASeveritySel.style.visibility; AL_WASeveritySel.style.visibility = "hidden"; svButtonSt(); // save button state } function processSpecAT() { if (AL_SpecAT.selectedIndex < 0) AL_SpecAT.selectedIndex = 0; PopUpAT.style.display=""; // enable AT Spec pop-up AL_SpecAT.focus(); svButtonSt(); // save button state } function processOKSpecAT() { PopUpAT.style.display="none"; // disable AT Spec pop-up reButtonSt(); // restore button states top.Rstatus.Pstat(""); CurrentAT = AL_SpecAT.options[AL_SpecAT.selectedIndex].value; processTypeClick(); processNewContinue(); } function processSpecATCancelButton() { PopUpAT.style.display="none"; // disable Add Confirm pop-up reButtonSt(); // restore button states SetButtonState(UUpdateButton,"1"); SetButtonState(UResetButton,"1"); top.Rstatus.Pstat(""); } function processSmtpConfirmCancelButton() { SMTPAddrCancel = true; PopUpConfirm.style.display="none"; // disable Add Confirm pop-up AL_WASeveritySel.style.visibility = sWASeverity; reButtonSt(); // restore button states top.Rstatus.Pstat(""); } var GSmtpArr = new Array(); var GSmtpArrOK = new Array(); var GSmtpIx = 0; var GSmtpOK = 0; function processSmtpConfirmOKButton() { SetButtonState(SMTPAddrOKButton,"1"); GSmtpArr.length = GSmtpArrOK.length = 0; GSmtpArr = GlobalSmtp.value.split(";"); GSmtpIx = GSmtpOK = 0; processSmtpConfirmOK_Continue(); } function processSmtpConfirmOK_Continue() { var wrk = new Array(); GSmtpArr[GSmtpIx] = TrimLeadingSpaces(GSmtpArr[GSmtpIx]); wrk = GSmtpArr[GSmtpIx].split(":"); wrk[1] = (wrk.length < 2) ? "25" : wrk[1]; top.Rstatus.Pstat("One moment while the SMTP Server address '"+GSmtpArr[GSmtpIx]+"' is verified",true); RpmMIL.Smtp(wrk[0],wrk[1],15); } function processSmtpResponse(ReqID,RetCode,Reason) { if ( SMTPAddrCancel ) { return; // ignore } if ( RetCode == 0 ) { top.Rstatus.Pstat("SMTP Server address '"+GSmtpArr[GSmtpIx]+"' is verified"); GSmtpArrOK[GSmtpOK++] = GSmtpArr[GSmtpIx]; } else { alert("SMTP Server address '"+GSmtpArr[GSmtpIx]+"' verify failed. Response message: "+Reason); } if ( ++GSmtpIx >= GSmtpArr.length ) { // if checked all if ( GSmtpOK == 0 ) { alert("Unsuccessful check of all specified SMTP Server(s). Try again"); SetButtonState(SMTPAddrOKButton,"0"); } else { var Strg = "Accept the successful SMTP Server(s): "; GlobalSmtp.value = GSmtpArrOK.join("; "); Strg += "'"+GlobalSmtp.value+"'"; if ( confirm( Strg ) ) { processSmtpAccept(); } else { SetButtonState(SMTPAddrOKButton,"0"); } } } else { processSmtpConfirmOK_Continue(); // do next } } function processSmtpAccept() { var wrk = new Array(); SmtpServerAddress = GSmtpArrOK.join("~"); AL_Smtp.value = GlobalSmtp.value; AL_OrigDomain.value = GlobalFrom.value; SmtpServerAuthStatus = (AL_PSmtpAuth.checked) ? "1" : "0"; AL_SmtpAuth.checked = (SmtpServerAuthStatus == "1") ? "checked" : ""; SmtpServerAuthLogin = AL_SmtpLogin.value = (SmtpServerAuthStatus == "1") ? AL_PSmtpLogin.value : ""; SmtpServerAuthPswd = AL_SmtpPswd.value = (SmtpServerAuthStatus == "1") ? AL_PSmtpPswd.value : ""; RpmCC_AL.SetGlobalSMTP(SmtpServerAddress+";"+GlobalFrom.value); // save Global setting & in Registry RpmCC_AL.RegSetKey(top.banner.ServerID+"GlobalSMTPServer",SmtpServerAddress+";"+GlobalFrom.value); RpmCC_AL.SetGlobalSMTPAuth(SmtpServerAuthStatus+";"+SmtpServerAuthLogin+";"+SmtpServerAuthPswd); PopUpConfirm.style.display="none"; // disable Add Confirm pop-up AL_WASeveritySel.style.visibility = sWASeverity; reButtonSt(); // restore button states top.Rstatus.Pstat("SMTP Server address(es) set"); } function TrimLeadingSpaces(Ostrg) { for ( var i=0; i<Ostrg.length; i++ ) { if ( Ostrg.charAt(i) != " " ) break; } if ( i > 0 ) Ostrg = Ostrg.substr(i); return Ostrg; } function svButtonSt() { // Get and save button states UNewSv = UNewButton.bdis; UEditSv = UEditButton.bdis; UDupSv = UDupButton.bdis; UDelSv = UDeleteButton.bdis; UUpSv = UUpdateButton.bdis; UResSv = UResetButton.bdis; initButtonState(); // disable buttons } function reButtonSt() { SetButtonState(UNewButton,UNewSv); SetButtonState(UEditButton,UEditSv); SetButtonState(UDupButton,UDupSv); SetButtonState(UDeleteButton,UDelSv); SetButtonState(UUpdateButton,UUpSv); SetButtonState(UResetButton,UResSv); } function processBeeperTest() { var Tstrg = ""+PgBpPort.options[PgBpPort.selectedIndex].text+";"; Tstrg += AL_BeeperNbr.value+";"+(BeepSecs.selectedIndex+1)+";"+AL_TTSend.value; SetCursor("wait"); top.banner.processStartComm(); SetButtonState(BTestButton,"1"); RpmCC_AL.BeeperTest(Tstrg); top.Rstatus.Pstat("One moment while the Beeper test completes",true); } function processProgramTest() { var Tstrg = "processProgramTest;"; var AEp = AL_ExecP.value; if ( document.RunPrgmRadio.AL_PLoc[1].checked ) { // if Remote checked AEp = ">"+AEp; } else if ( document.RunPrgmRadio.AL_PLoc[2].checked ) { // if Remote Reboot checked AEp = '>"RESTART"'; } if ( AEp.length == 0) { top.Rstatus.Pstat("Please select a Name of Program to Run on Alert Action",true); alert("Please select a Name of Program to Run on Alert Action"); processGeneralClick(ActsTab); processRunPSetup(); return; } Tstrg += AEp+";"+AL_ArgsP.value; ProgramTestInProgress = true; SetCursor("wait"); top.banner.processStartComm(); SetButtonState(PrgTestButton,"1"); RpmCC_AL.EmailTest(Tstrg); top.Rstatus.Pstat("One moment while the Execute Program test completes",true); } function processPagerTest() { var Tstrg = ""+PgBpPort.options[PgBpPort.selectedIndex].text+";"; var warrAN = new Array(); warrAN = AL_AccessNbr.value.split(";"); var AccessNbr = warrAN.join("[+]"); warrAN = AL_PhoneNbr.value.split(";"); var PhoneNbr = warrAN.join("[+]"); warrAN = AL_PagePswd.value.split(";"); var PagePswd = warrAN.join("[+]"); Tstrg += AccessNbr+"^"+PagePswd+";"+PhoneNbr+";"+AL_TTSpeak.value; SetCursor("wait"); top.banner.processStartComm(); SetButtonState(PTestButton,"1"); RpmCC_AL.PagerTest(Tstrg); top.Rstatus.Pstat("One moment while the Pager test completes",true); } function processEmailTest() { var warr = new Array(); var Tstrg = ""; if ( AL_EAddr.value == "" ) { alert("Please enter a valid Email address to send the Test Email"); AL_EAddr.focus(); return; } if ( AL_OrigDomain.value.length > 0 ) { Tstrg += AL_OrigDomain.value; } else { Tstrg += "MonitorIT_Email_Test" } warr = AL_EAddr.value.split(";"); AL_EAddr.value = warr.join(","); Tstrg += ";"+AL_EAddr.value+";"+AL_ESubj.value+";"+SmtpServerAddress; SetCursor("wait"); top.banner.processStartComm(); SetButtonState(ETestButton,"1"); RpmCC_AL.EmailTest(Tstrg); top.Rstatus.Pstat("One moment while the Email test completes",true); } function processEmailSetup() { Acts1.style.display = ""; Acts2.style.display = "none"; Acts3.style.display = "none"; Acts4.style.display = "none"; } function processPagerSetup() { Acts1.style.display = "none"; Acts2.style.display = ""; Acts3.style.display = "none"; Acts4.style.display = "none"; } function processBeeperSetup() { Acts1.style.display = "none"; Acts2.style.display = "none"; Acts3.style.display = ""; Acts4.style.display = "none"; } function processRunPSetup() { Acts1.style.display = "none"; Acts2.style.display = "none"; Acts3.style.display = "none"; Acts4.style.display = ""; } function processPgBpPortChange() { var Bstrg = ""+(BeepSecs.selectedIndex+1)+";"; Bstrg += PgBpPort.options[PgBpPort.selectedIndex].text; RpmCC_AL.SetGlobalBeeper(Bstrg); // save Global setting } /* Process Combo Alert Name Change Event */ function processDefAlertName() { initButtonState(); Nobj = document.all.AL_AlertSel; // get object for (i=0; i < Nobj.length; ++i) { if ( Nobj.options[i].selected ) { AlertSelectIdx = i; AL_AlertSel.blur(); populateInput(AlertRecLength*i); break; } } } /* Set initial button state for all buttons */ function initButtonState() { SetButtonState(UNewButton,"1"); SetButtonState(UEditButton,"1"); SetButtonState(UDupButton,"1"); SetButtonState(UDeleteButton,"1"); SetButtonState(UUpdateButton,"1"); SetButtonState(UResetButton,"1"); } function checkEnableSchedButton() { // Enable Schedule Button? } // Reset DB Change Event flag function resetDBCEF() { CTid = null; ignoreDBChangeEvent = false; } /* Reset Processing after initial and subsequent Alert operations */ function processResetButton() { ErrProcFlag = true; processGoodResetButton(); } var ErrProcFlag = false; function processGoodResetButton() { top.banner.processStopCommX(); AlertSelectIdx = (ALMode == "Edit" || DuplicateFlag) ? AlertSelectIdx : 0; // reset index ALMode = ""; ALupMode = ""; PINP_Bsy = DuplicateFlag = false; if ( CollapseButton.style.display != "none" ) { processCollapseButton(); } if ( SuppressMonitoringState == "1") { // if opened SuppressMonitoringState = "0"; InactPer.style.display = ""; InactPerDD.style.display = "none"; } AL_CCOne.innerHTML = ""; // clear current display<HR> AL_CCOneServ.innerHTML = ""; // clear current display AL_CCOneEventLog.innerHTML = ""; // clear current display AL_CCOneWinServ.innerHTML = ""; // clear current display AL_CCOneFileCheck.innerHTML = ""; // clear current display AL_CCOneProcessCheck.innerHTML = ""; // clear current display AL_CCOneSyslogCheck.innerHTML = ""; // clear current display if ( AlertLupRecCount == 0 ) { AlertSelectIdx = 0; // reset index closeCalendarTimeFields(); // Insure D/T fields closed processCommonReset(); SetButtonState(UNewButton,"0"); SetButtonState(UEditButton,"1"); SetButtonState(UDupButton,"1"); SetButtonState(UDeleteButton,"1"); AL_CCOne.style.backgroundColor = "threedlightshadow"; AL_CCOne.style.height = CCOneBoxHeight; AL_CCOneServ.style.backgroundColor = "threedlightshadow"; AL_CCOneServ.style.height = CCOneBoxHeight; AL_CCOneEventLog.style.backgroundColor = "threedlightshadow"; AL_CCOneEventLog.style.height = CCOneBoxHeight; AL_CCOneWinServ.style.backgroundColor = "threedlightshadow"; AL_CCOneWinServ.style.height = CCOneBoxHeight; AL_CCOneFileCheck.style.backgroundColor = "threedlightshadow"; AL_CCOneFileCheck.style.height = CCOneBoxHeight; AL_CCOneProcessCheck.style.backgroundColor = "threedlightshadow"; AL_CCOneProcessCheck.style.height = CCOneBoxHeight; AL_CCOneSyslogCheck.style.backgroundColor = "threedlightshadow"; AL_CCOneSyslogCheck.style.height = CCOneBoxHeight; CurrentAT = ServiceType; processTypeClick(); SrvcNmeRow.style.visibility = "visible"; if ( top.QuickStartProcessing ) { showHelp('Help/QuickStart_Help.htm#ConfigureWatches'); CurrentAT = ServiceType; processNewContinue(); window.focus(); } } else { SetButtonState(UUpdateButton,"1"); SetButtonState(UResetButton,"1"); processGeneralClick(CounterTab); Tid = setTimeout("processResetFinish()",10); // delay 10 ms. then finish Reset } } function processResetFinish() { Tid = null; // clear timeout ID closeCalendarTimeFields(); // Insure D/T fields closed processCommonReset(); // common button and field reset if ( ErrProcFlag == true ) { AlertSelectIdx = 0; // reset index ErrProcFlag = false; // reset and exit SetButtonState(UNewButton,"0"); SetButtonState(UEditButton,"0"); SetButtonState(UDupButton,"0"); SetButtonState(UDeleteButton,"0"); return; } if ( LastNewName != null ) { getAlertID(LastNewName); //populateInput(AlertRecLength*AlertSelectIdx); //AL_AlertSel.options[AlertSelectIdx].selected = "selected"; LastNewName = null; // reset } //else { // populateInput(0); // set input fields // AL_AlertSel.options[0].selected = "selected"; //} populateInput(AlertRecLength*AlertSelectIdx); AL_AlertSel.options[AlertSelectIdx].selected = "selected"; } function PopUpContextOpen() { AL_SpecAT.style.visibility = "hidden"; AL_AlertSel.style.visibility = "hidden"; AL_EvLogName.style.visibility = "hidden"; AL_EvLogType.style.visibility = "hidden"; AL_SchedCount.style.visibility = "hidden"; AL_SchedUnits.style.visibility = "hidden"; AL_SrvFreqCount.style.visibility = "hidden"; AL_SrvFreqUnits.style.visibility = "hidden"; AL_MaxAlertsCount.style.visibility = "hidden"; AL_OIDName.style.visibility = "hidden"; AL_DependencySel.style.visibility = "hidden"; AL_SLPrec.style.visibility = "hidden"; AL_ELPrec.style.visibility = "hidden"; PgBpPort.style.visibility = "hidden"; BeepSecs.style.visibility = "hidden"; PopUpFAC.style.display = "none"; if ( CurrentAT == ProcessCheckType ) { PopUpFAC.style.display = "none"; } } function PopUpContextClose() { AL_SpecAT.style.visibility = "visible"; AL_AlertSel.style.visibility = "visible"; AL_EvLogName.style.visibility = "visible"; AL_EvLogType.style.visibility = "visible"; AL_SchedCount.style.visibility = "visible"; AL_SchedUnits.style.visibility = "visible"; AL_SrvFreqCount.style.visibility = "visible"; AL_SrvFreqUnits.style.visibility = "visible"; AL_MaxAlertsCount.style.visibility = "visible"; AL_DependencySel.style.visibility = "visible"; AL_OIDName.style.visibility = "visible"; AL_SLPrec.style.visibility = "visible"; AL_ELPrec.style.visibility = "visible"; PgBpPort.style.visibility = "visible"; BeepSecs.style.visibility = "visible"; } function checkSelUnselButtons() { } // Create new Window and load specified Page function processAdminComputerButton() { processPopUpSelect(10,false); return; } /* Process Click on selected Tab */ var CurSelTab = null; // current selected tab function processActionClick(th) { Acts1.style.display="none"; Acts2.style.display="none"; Acts3.style.display="none"; Acts4.style.display="none"; EmailTab.className="TabUnsel"; PagerTab.className="TabUnsel"; BeeperTab.className="TabUnsel"; ProgramTab.className="TabUnsel"; th.className="TabSel"; CurSelTab = th.id; switch ( th.id ) { case "EmailTab" : Acts1.style.display=""; // Enable this Tab's view break; case "PagerTab" : Acts2.style.display=""; // Enable this Tab's view break; case "BeeperTab" : Acts3.style.display=""; // Enable this Tab's view break; case "ProgramTab" : Acts4.style.display=""; // Enable this Tab's view break; } } var test = false; var waitapply = false; var testnumber = 0; var testcount = 0; function startTestButton() { if ( test ) { if ( waitapply ) { if ( UEditButton.bdis == "0" ) { Tid = setTimeout("startTestButton()",TestDelayTime); // delay if ( top.Rstatus.statw.innerText == "Request Completed" ) { waitapply = false; } return; } } if ( UEditButton.bdis == "0" ) { processEditButton(); Tid = setTimeout("startTestButton()",TestDelayTime); // delay return; } else if ( UUpdateButton.bdis == "0" ) { if ( testnumber == 0 ) { processUpdateButton(); } else { processGoodResetButton() } ++testcount; waitapply = true; } Tid = setTimeout("startTestButton()",100); // delay } } var TestDelayTime = 100; function processAdjustTestTime() { TestDelayTime += 1000; if ( TestDelayTime > 11000 ) { TestDelayTime = 100; } top.Rstatus.Pstat("Test Time Delay = "+TestDelayTime+" ms."); }